package com.ll.domain.tenant.biz.impl;

import com.ll.dal.po.TenantPO;
import com.ll.domain.tenant.base.TenantBaseService;
import com.ll.domain.tenant.biz.TenantDomainService;
import com.ll.domain.tenant.convert.TenantConvert;
import com.ll.domain.tenant.dto.TenantDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class TenantDomainServiceImpl implements TenantDomainService {

    private final TenantBaseService tenantBaseService;

    @Override
    public TenantDTO getById(Long id, boolean checkNull) {
        TenantPO po = tenantBaseService.getById(id, checkNull);
        return TenantConvert.PO2DTO(po);
    }
}
